function [] = grafica_seg(UM,cant_s,Mizq,Mder)

% -------------------------------------------
%             graficacion

kizq= 3;
kder= 6;
Mizq = Mizq *kizq;
Mder = Mder *kder;
M = Mizq+Mder;

fig = figure()
hold on
for i=1:cant_s,
    subplot(3,3,i)
    
    aux =zeros(80,80);
    aux(:,:) = M(i,:,:);

    titulo = num2str(round(UM(i)));
    image(aux)
    title([titulo,' UM'])
    colormap(jet(10))
    axis image        % Set aspect ratio to obtain square pixels
    axis([20 60 20 60])
    grid on

end
print(fig,'-djpeg','figure1.jpg')
hold off
